import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      component: () => import('../views/Account/LoginView.vue'),
    },
    {
      path: '/SmartMeetingLayout',
      component: () => import('../views/MenuList/SmartMeetingLayout.vue'),
      children: [
        {
          path: '',
          redirect: '/home'
        },
        {
          path: '/home',
          name: 'home',
          component: () => import('../views/HomeView.vue')
        },
        {
          path: '/room',
          name: 'room',
          component: () => import('../views/RoomManageView.vue')
        },
        {
          path: '/appointment',
          name: 'appointment',
          component: () => import('../views/AppointMent/AppointmentList.vue')
        },
        {
          path: '/appointment-details',
          name: 'appointment-details',
          component: () => import('../views/AppointMent/AppointmentDetails.vue')
        },
        {
          path: '/appointment-summary',
          name: 'appointment-summary',
          component: () => import('../views/AppointMent/AppointSummary.vue')
        },
        {
          path: '/audit',
          name: 'audit',
          component: () => import('../views/AuditView.vue')
        },
        {
          path: '/stat',
          name: 'stat',
          component: () => import('../views/StatView.vue')
        },
        {
          path: '/SysUserView',
          name: 'sys-user',
          component: () => import('../views/SystemManager/SysUserView.vue')
        },
        {
          path: '/sys-role',
          name: 'sys-role',
          component: () => import('../views/SystemManager/SysRoleView.vue')
        },
        {
          path: '/sys-dept',
          name: 'sys-dept',
          component: () => import('../views/SystemManager/SysDeptView.vue')
        },
        {
          path: '/sys-log',
          name: 'sys-log',
          component: () => import('../views/SystemManager/SysLogView.vue')
        },
        {
          path: '/sys',
          name: 'sys',
          component: () => import('../views/SysManageView.vue')
        },
        {
          path: '/meeting-list',
          name: 'meeting-list',
          component: () => import('../views/MeetingListView.vue')
        }
      ]
    }
  ]
})

export default router
